int hammingDistance(int x, int y) {
	int r = x ^ y;
	int n = 0;
	while (r) {
		n++;
		r = r & (r - 1);
	}
	return n;
}